package hcn.protocol.brandnew.zhenliao.zhenduan;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import org.atag.sysrouter.annotation.DictionaryMapping;


/**
 * 门诊诊断信息新增 - ODS_03010001
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "MsgBody")
@XmlAccessorType(XmlAccessType.FIELD)
public class SaveDiagnoseInformationRequest extends BaseRequest {

    /**
     * 就诊医疗机构组织机构代码
     */
    @XmlElement(name = "VisitOrganization")
    private String visitOrganization;
    /**
     * 身份证件号码
     */
    @XmlElement(name = "IdCard")
    private String idCard;
    /**
     * 身份证件类别代码
     */
    @XmlElement(name = "IdCardCode")
    @DictionaryMapping(id = "CV02_01_101")
    private String idCardCode;
    /**
     * 业务系统患者档案ID
     */
    @XmlElement(name = "SourcePatientId")
    private String sourcePatientId;
    /**
     * 就诊流水号
     */
    @XmlElement(name = "VisitId")
    private String visitId;
    /**
     * 诊断信息
     */
    @XmlElementWrapper(name = "DiagnoseRecords")
    @XmlElement(name = "DiagnoseRecord")
    private List<DiagnoseRecord> diagnoseRecords;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class TraChiSyndrome {

        /**
         * 中医证候id
         */
        @XmlElement(name = "TraChiSyndromeId")
        private String traChiSyndromeId;
        /**
         * 中医证候代码
         */
        @XmlElement(name = "TraChiSyndromeCode")
        private String traChiSyndromeCode;
        /**
         * 中医证候名称
         */
        @XmlElement(name = "TraChiSyndromeName")
        private String traChiSyndromeName;
        /**
         * 中医证候组号
         */
        @XmlElement(name = "TraChiSyndromeNo")
        private String traChiSyndromeNo;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class DiagnoseRecord {

        /**
         * 诊断类型
         */
        @XmlElement(name = "DiagnosticType")
        private String diagnosticType;
        /**
         * 诊断id
         */
        @XmlElement(name = "DiagnoseId")
        private String diagnoseId;
        /**
         * 西医诊断编码
         */
        @XmlElement(name = "DiagnoseCode")
        private String diagnoseCode;
        /**
         * 西医诊断名称
         */
        @XmlElement(name = "DiagnoseName")
        private String diagnoseName;
        /**
         * 主要诊断标志
         */
        @XmlElement(name = "MasterDiseaseSign")
        private String masterDiseaseSign;
        /**
         * 症候信息
         */
        @XmlElementWrapper(name = "TraChiSyndromeList")
        @XmlElement(name = "TraChiSyndrome")
        private List<TraChiSyndrome> traChiSyndromeList;
    }

}
